<!DOCTYPE html>
<html>
<head>
<title><?php echo $this->headTitle();?><?php echo $this->setting()->get('title');?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="<?php echo str_replace('_', '-', $this->language());?>" />
<meta name="Description" content="<?php echo $this->setting()->get('description');?>" />
<meta name="Keywords" content="<?php echo $this->setting()->get('keywords');?>" />
<link rel="shortcut icon" href="<?php echo $this->baseUrl('/favicon.ico');?>"/>
<link href="<?php echo $this->baseUrl('/static/style/' . $this->language() . '/layout.css');?>" rel="stylesheet" type="text/css" >
<script type="text/javascript" src="<?php echo $this->baseUrl('/static/jquery/jquery-1.7.min.js');?>"></script>
<?php echo $this->headLink() . $this->headStyle() . $this->headScript() . "\n";?>
</head>

<body id="<?php echo $this->viewId();?>">
<?php
echo '<div class="breadcrumb">';
echo '<ul>';
$pages = system_nav_crumbs::getInstance()->getPages();
$i = 0;
foreach($pages AS $page) {
	$i++;
	echo '<li>';
	if($i < count($pages)) {
		echo '<a href="' . $page->href() . '">' . $this->escape($page->getLabel()) . '</a>';
	} else {
		echo $this->escape($page->getLabel());
	}
	echo '</li>';
	if($i < count($pages)) echo '<li>»</li>';
}
echo '</ul><hr/>';
echo "</div>\n";

/**
 * 抛出异常在这里捕捉
 */
if($this->throwException) {
	echo '<div class="body"><div class="msg"><div class="common error">';
	echo '<i class="icon"></i><h4>EXCEPTION:</h4><div class="msg-bd">';
	if(is_string($this->throwException)) {
		echo $this->throwException;
	} else {
		echo $this->throwException->getMessage();
	}
	echo '</div></div></div></div>';
	echo "\n";
}
/**
 * 抛出消息
 */
if($this->throwMessage) {
	echo $this->render('include/complete.phtml') . "\n";
} else {
	echo $this->content . "\n";
}
echo $this->render('include/footer.phtml') . "\n";
echo $this->render('include/debug.phtml');
?>
</body>
</html>